import cv2
import numpy as np

img = cv2.imread('statue_small.jpg')
o = img.copy()
o = cv2.medianBlur(o, 5)
gray = cv2.cvtColor(o, cv2.COLOR_BGR2GRAY)
binary = cv2.Canny(o, 50, 150)
lines = cv2.HoughLinesP(binary, 1, np.pi / 180, 15, minLineLength=100, maxLineGap=18)
for line in lines:
    x1, y1, x2, y2 = line[0]
    cv2.line(img, (x1, y1), (x2, y2), (0, 0, 255), 2)

cv2.imshow('canny', binary)
cv2.imshow('img', img)
cv2.waitKey()
cv2.destroyAllWindows()
